<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="cn.pzhu.jspdb.dao.UserDao" %>
<%@ page import="cn.pzhu.jspdb.bean.User" %>
<%
	//1.read 
	request.setCharacterEncoding("UTF-8");
	String loginName = request.getParameter("loginName");
	String password = request.getParameter("password");

	User u=new User(loginName,password);
	
	if(new UserDao().add(u)){
		response.sendRedirect("list.jsp");
	}else{
		out.println("Add Error");
	}
	
%>
